package kr.or.kosta.otr.persistence.region;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.annotation.Resource;

import kr.or.kosta.otr.vo.RegionVO;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
@Repository("RegionDao")
public class RegionDaoImp implements RegionDao{
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	
	@Override
	public ArrayList<RegionVO> getAllRegion() throws SQLException {
		return (ArrayList<RegionVO>) sqlMapClient.queryForList("Region.getAllRegion");
	}

	@Override
	public RegionVO getRegion(HashMap<String, Object> map) throws SQLException {
		return (RegionVO) sqlMapClient.queryForObject("Region.getRegion", map);
	}

}
